/*
 * 
 * Copyright 2010 David H Pollack
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. 
 * 
 * 
 */

package com.dhpollack.rotogss.data;

import java.util.Set;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * @author davidpl
 *
 */
@PersistenceCapable
public class YahooLeagueTeams {
	
    @PrimaryKey
    @Persistent
    private Key teamKey;
    
    @Persistent
    private YahooLeagues leaguekey;

    @Persistent
    private Integer teamId;
    
    @Persistent
    private String name;

    @Persistent
    @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true")
    private String url;
    
    @Persistent
    private Integer managerId;

    @Persistent
    private String managerName;
    
    @Persistent
    private Integer comanagerId;

    @Persistent
    private String comanagerName;

    @Persistent
    private Set<Key> googleUsers;

    @Persistent(mappedBy = "teamkey")
    private Set<YahooLeagueTeamStandings> leagueTeamStandings;
    
	public Key getTeamKey() {
		return teamKey;
	}

	public void setTeamKey(Key teamKey) {
		this.teamKey = teamKey;
	}
	
	public YahooLeagues getLeague() {
		return leaguekey;
	}

	public Integer getTeamId() {
		return teamId;
	}

	public void setTeamId(Integer teamId) {
		this.teamId = teamId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getManagerId() {
		return managerId;
	}

	public void setManagerId(Integer managerId) {
		this.managerId = managerId;
	}

	public String getManagerName() {
		return managerName;
	}

	public void setManagerName(String managerName) {
		this.managerName = managerName;
	}

	public Integer getComanagerId() {
		return comanagerId;
	}

	public void setComanagerId(Integer comanagerId) {
		this.comanagerId = comanagerId;
	}

	public String getComanagerName() {
		return comanagerName;
	}

	public void setComanagerName(String comanagerName) {
		this.comanagerName = comanagerName;
	}

	public Set<Key> getGoogleUsers() {
		return googleUsers;
	}

	public void setGoogleUsers(Set<Key> googleUsers) {
		this.googleUsers = googleUsers;
	}

	public void addGoogleUsers(Key googleUser) {
		this.googleUsers.add(googleUser);
	}

	public void removeGoogleUsers(Key googleUser) {
		this.googleUsers.remove(googleUser);
	}

	public YahooLeagues getLeaguekey() {
		return leaguekey;
	}

	public Set<YahooLeagueTeamStandings> getLeagueTeamStandings() {
		return leagueTeamStandings;
	}

	public void setLeagueTeamStandings(
			Set<YahooLeagueTeamStandings> leagueTeamStandings) {
		this.leagueTeamStandings = leagueTeamStandings;
	}

	public void addLeagueTeamStandings(
			YahooLeagueTeamStandings leagueTeamStanding) {
		this.leagueTeamStandings.add(leagueTeamStanding);
	}

	public void removeLeagueTeamStandings(
			YahooLeagueTeamStandings leagueTeamStanding) {
		this.leagueTeamStandings.remove(leagueTeamStanding);
	}


}
